1. Field of Invention
The present invention relates to a device, a program, and a method for transferring data between a two-dimensional memory capable of realizing an efficient SIMD (Single Instruction stream Multiple Data stream) operation and a one-dimensional memory such as SRAM. More specifically, the invention relates to a data transfer device for multidimensional memory, a data transfer program for multidimensional memory, and a data transfer method for multidimensional memory capable of performing an efficient SIMD operation and suitable for transferring data between a multidimensional memory and a one-dimensional memory.
2. Description of Related Art
An SIMD operation is a technique for processing a plurality of data by using the same instruction with a plurality of processors. For this reason, in general, when a continuous part of data stream is taken out from a one-dimensional data stream stored in a memory and parallel operation is performed in respect thereto, the SIMD operation is considerably efficient.
However, when the data that is a target of the operation is not stored continuously in the memory or the operation result thereof is intended to be dispersively arranged at a predetermined position in the memory, a processing for preparing the data that is a target of parallel operation or a processing for arranging the result of parallel operation at a predetermined position in the memory is required. As a result, there is a disadvantage in that the intended effects of the original parallel processing are hindered.
On the other hand, there is a known technique capable of performing a two-dimensional discrete cosine transform at high speed by using the SIMD processing, as disclosed by Japanese Laid-Open Patent Application Publication No. 2000-69478. This invention teaches a process of rearranging image data arranged in a scanning order, in an order suitable for performing a butterfly operation in the transform encoding operation by using the SIMD processing, to store the rearranged result in the memory and to perform the two-dimensional discrete cosine transform of the image data stored in the memory.
However, in the invention, there is a problem in that the additional operations for rearranging the image data are required, and when they are to be realized by means of hardware, many circuits corresponding to the number of rearranging operations are required, thus increasing the size of the circuits. Further, there is an additional problem of increased power consumption caused by frequent memory accesses by the rearranging operations.
As one technique for solving these problems, a two-dimensional memory can be adopted in which memory space is constituted by a two-dimensional space as seen from accessing side. The two-dimensional memory can include, for example, n memories in which a two-dimensional memory space is constructed by arranging predetermined minimum two-dimensional virtual memory spaces in horizontal and vertical directions and in which each address of said minimum two-dimensional virtual memory spaces is previously assigned to each memory in a predetermined rule, a read data control unit for specifying an access position in the minimum two-dimensional virtual memory spaces when reading data, rearranging each read the data from the n memories in accordance with a read access mode for designating a direction or a pattern for reading data from the specified access position, and outputting each rearranged read data in a lump, and a read address control unit for correcting a designated read address to a predetermined address in accordance with the designated read access mode and the specified access position when designating read addresses, to output the corrected address to the n memories.
By this configuration, since continuous data or discontinuous data arranged in the horizontal direction or the vertical direction from the designated position in the two-dimensional memory spaces can be simultaneously read from the respective physical memories, it is possible to realize an efficient SIMD operation. Further, this two-dimensional memory is described in detail in Japanese Patent Application No. 2000-355945.
However, when the SIMD operation is executed, since the data of a targeted operation stored in SRAM, etc. (hereinafter, in light of two-dimensional memory, a normal memory such as SRAM is referred to as a one-dimensional memory) are read and stored into the two-dimensional memory to perform the operation on the data, a scheme for efficiently transferring data from the one-dimensional memory to the two-dimensional memory can be required. Similarly, after the operation is executed, since the operation data stored in the two-dimensional data is written on the one-dimensional memory, a scheme for efficiently transferring data from the two-dimensional memory to the one-dimensional memory can also be required. In this case, it is preferable that the data transfer should be more suitable for the operation, in contrast to the transferring process itself. That is, in SIMD operation, since there is a case that the operation is executed on the data of a predetermined area in the two-dimensional space, it is required that such data can be read from the one-dimensional memory in a lump.
This applies to a case where, not limited to the two-dimensional memory, data is transferred between a multidimensional memory in which the memory space is constituted by a multidimensional space as seen from accessing side and a one-dimensional memory as seen from accessing side.